<script setup lang="ts">
import { props } from '../props';
const { src } = defineProps(props)
</script>
<template>
    <div class="w-100% h-100% position-absolute">
        <img :src="src" class="images w-100% h-100%" />
    </div>
</template>
<style scoped lang="scss">
.images {
    z-index: -1;
    /* 背景图垂直、水平均居中 */
    background-position: center center;
    /* 背景图不平铺 */
    background-repeat: no-repeat;
    /* 当内容高度大于图片高度时，背景图像的位置相对于viewport固定 */
    background-attachment: fixed;
    /* 让背景图基于容器大小伸缩 */
    background-size: cover;
}
</style>